import { defineComponent } from "vue";
import { createFromIconfontCN } from '@ant-design/icons-vue';

const MyIcon = createFromIconfontCN({
  scriptUrl: 'https://at.alicdn.com/t/c/font_3928943_w51fmia117j.js',
});

export default defineComponent({
  name: 'LIcon',
  props: {
    type: {
      type: String,
      required: true,
    },
    color: {
      type: String,
      default: '',
    },
    size: {
      type: String,
      default: '16px',
    },
  },
  setup(props) {
    return () => <MyIcon type={props.type} style={[props.color && { color: props.color }, { fontSize: props.size }]} />
  }
})